import React, { Component } from 'react'
import { Checkbox, Button } from 'antd';

export default class Bottom extends Component {

    onChange = e => {
        this.props.onSelectAll(e.target.checked);
    }

    render() {
        return (
            <div style={{ display: 'flex', justifyContent: 'space-between' }}>
                <div>
                    <Checkbox onChange={this.onChange}>全选</Checkbox>
                    <span>已完成{this.props.done}/全部{this.props.total}</span>
                </div>
                <Button color="danger" variant="outlined" onClick={this.props.onDeleteSelected}>
                    删除已完成
                </Button>
            </div>
        )
    }
}
